﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._22_状态模式
{

    /// <summary>
    /// 订单取消状态
    /// </summary>
    public class CancelledState : IOrderState
    {
        /// <summary>
        /// 处理订单 订单取消后不能再处理所有状态
        /// </summary>
        /// <param name="order"></param>
        public void Process(Order order) => Console.WriteLine("错误：订单已取消");
        public void Ship(Order order) => Console.WriteLine("错误：订单已取消");
        public void Deliver(Order order) => Console.WriteLine("错误：订单已取消");
        public void Cancel(Order order) => Console.WriteLine("错误：订单已取消");
    }
}
